<!DOCTYPE html>
<html lang="zh">

<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Document</title>
  <link rel="stylesheet" href="../css/reset.css" />
  <link rel="stylesheet" href="../css/top.css" />
  <link rel="stylesheet" href="../css/font.css" />
  <script src="../js/lib/jquery.js"></script>
</head>

<body>
  <nav id="site-nav">
    <!-- 左 -->
    <p><i class="mui-global-iconfont">󰄫</i><a href="#">天猫首页</a></p>
    <p class="sn-container" id="login-info">
      <em>喵，欢迎来天猫</em>
      <a class="nav-a-1" href="http://localhost:8080/html/register.html" target="_top">Hi ~ 74661</a>
      <a class="nav-a-2" href="http://localhost:8080/html/Sign-In.html" target="_top">退出</a>
    </p>

    <!-- 右 -->
    <ul class="sn-quick-menu">
      <!-- 我的淘宝 -->
      <li class="sn-mytaobao menu-item j_MyTaobao">
        <div class="sn-menu nav-li-div">
          <a class="menu-hd" href="" target="_top" rel="nofollow">我的淘宝<b></b></a>
          <div class="menu-bd">
            <div class="menu-bd-panel" id="myTaobaoPanel">
              <a href="" target="_top" rel="nofollow">已买到的宝贝</a>
              <br />
              <a href="" target="_top" rel="nofollow">已卖出的宝贝</a>
            </div>
          </div>
        </div>
      </li>
      <!-- 购物车 -->
      <li class="sn-cart">
        <i class="mui-global-iconfont">󰅈</i><a class="sn-cart-link" href="http://localhost:8080/html/ShoppingCart.html"
          target="_top" rel="nofollow">购物车</a>
      </li>

      <!-- 收藏夹 -->
      <li class="sn-favorite menu-item">
        <div class="sn-menu"><a class="menu-hd" href="//shoucang.taobao.com/shop_collect_list.htm?scjjc=c1"
            target="_top" rel="nofollow">收藏夹<b></b></a>
          <div class="menu-bd">
            <div class="menu-bd-panel">
              <a href="" target="_top" rel="nofollow">收藏的宝贝</a>
              <br>
              <a href="" target="_top" rel="nofollow">收藏的店铺</a>
            </div>
          </div>
        </div>
      </li>

      <!-- 手机版 -->
      <li class="sn-mobile"><i class="mui-global-iconfont">㑈</i>
        <a title="天猫无线" target="_top" class="sn-mobile-link" href="">手机版</a>
        <div>
        
          <div class="sn-qrcode">
            <div class="sn-qrcode-content"></div>
            <p>扫一扫，定制我的天猫！</p><b></b>
          </div>
        </div>
      </li>

      <!-- 淘宝网 -->
      <li class="sn-home"><a href="">淘宝网</a></li>

      <!-- 商家支持 -->
      <li class="sn-seller menu-item">
        <div class="sn-menu J_DirectPromo"><a class="menu-hd   " href="//mai.taobao.com" target="_top">商家支持<b></b></a>
          <div class="menu-bd sn-seller-lazy" id="nav-BAI">
            <ul>
              <li>
                <h3>商家：</h3>
                <a target="_top" href="//mai.taobao.com/">商家中心</a>
                <a class="sitemap-right" target="_top"
                  href="">天猫规则</a>
                <a class="sitemap-right" target="_top"
                  href="//zhaoshang.tmall.com/?acm=lb-tms-1104633-90536.1003.4.268545&amp;scm=1003.4.lb-tms-1104633-90536.OTHER_2_268545">商家入驻</a>
                <a target="_top"
                  href="//fw.tmall.com/?acm=lb-tms-1104633-90536.1003.4.268545&amp;scm=1003.4.lb-tms-1104633-90536.OTHER_3_268545">运营服务</a>
                <a class="sitemap-right" target="_top" href="//www.tmall.com/wow/seller/act/tmallpinkong">商家品控</a> <a
                  target="_top"
                  href="//fuwu.tmall.com/?acm=lb-tms-1104633-90536.1003.4.268545&amp;scm=1003.4.lb-tms-1104633-90536.OTHER_5_268545">商家工具</a>
                <a target="_top" href="//zhiku.tmall.com">天猫智库</a>
                <a class="sitemap-right" target="_top"
                  href="//maowo.tmall.com/?acm=lb-tms-1104633-90536.1003.4.268545&amp;scm=1003.4.lb-tms-1104633-90536.OTHER_8_268545">喵言喵语</a>
              </li>
              <li>
                <h3>帮助：</h3>
                <div><a target="_top" href="//helpcenter.tmall.com/index?from=high" style="width:80px">商家服务大厅</a></div>
                <div><a target="_top" href="//infob.taobao.com/help">问商友</a></div>
              </li>
            </ul>
          </div>
        </div>
      </li>
    </ul>
  </nav>
</body>
<script>
  function getUrlmessage() {
    let test = window.location.search;
    test = test.slice(1).split("&");
    let urlObj3 = {};
    test.forEach(item => {
      let arr = item.split("=");
      urlObj3[arr[0]] = arr[1];
    });
    return urlObj3;
  }
  const urlObj3 = getUrlmessage();



if(urlObj3.id!=undefined){
  $(function(){
    $('.nav-a-1').text('Hi ~'+urlObj3.id);
    $('.nav-a-2').text('退出').attr('href','#');
    $('.nav-a-2').click(function(){
    $('.nav-a-1').text('请登录').attr("href","http://localhost:8080/html/register.html");
    $('.nav-a-2').text('立即注册').attr('href','http://localhost:8080/index.html');
    })
  })
}else{
  $('.nav-a-1').text('请登录');
    $('.nav-a-2').text('立即注册');
}

</script>
</html>